<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jQuery.js"></script>
    <script>
        //添加属性
        function add(){
         var $div = $("div");
         $div.prop("style","color:red");
        }
        //删除
        function del(){
         var $div = $("div");
         $div.removeProp("style");
        }
    </script>
</head>
<body>
  <div>约吗</div>
  <input type="button"  value="添加" onclick="add()"/>
  <input type="button"  value="删除" onclick="del()"/>
</body>
</html>